home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Collections: MegaDisc
/
MegaDisc 32 (1993-02)(MegaDisc Digital Publishing)(AU)(Disk 2 of 2).zip
/
MegaDisc 32 (1993-02)(MegaDisc Digital Publishing)(AU)(Disk 2 of 2).adf
/
hyperbook
/
HyperBook_Menu
< prev
next >
Wrap
Text File
|
1993-02-11
|
11KB
|
216 lines
Menu Systems and Flexible Selectors
by John Collett
]] 32 [[ ]] 32 [[ ]] 32 [[ ]] 32 [[ ]] 32 [[ ]] 32 [[ ]] 32 [[ ]] 32 [[
Along came MD31 - a wide-ranging and interesting collection, including
the useful, the amusing, the challenging, the sometimes downright
baffling, and all presented at that impeccably high standard we have
come to expect from the editor's desk. (Even the Editorial was
interesting - MD Extras is a great idea.)
Some topics keep coming back, and we have long had a rich and sometimes
bewildering choice of menu systems. Just when I thought that surely
nobody would be showing us any more ways of obtaining user-designed
menus, we were offered at least two further bites at that particular
cherry.
1
MasterMenu, 'a non-fancy, easy-to-use menu system capable
of handling 32 menu entries', reviewed by John Knight, who
provided an elegant sample screen, and an enthusiastic
description of its strengths.
2
P-Index,"a flexible selector program", another impressive
contribution from Chas A. Wyndham, the author of the P-Suite
series of utilities, this time "showing us how we can arrange a
menu in terms of labels or icons to suit our personal taste."
These presentations confronted me just as I was suffering from a
particularly nasty attack of exaggerated self-satisfaction because of
the way in which my own recent menu-designing had provided what I
thought was the last word in elegance, power, flexibility, and
aesthetic appeal, and I had got into a settled routine in using it.
Modesty being one of my dominant personality traits (I'm glad you'd
noticed), I wasn't going to boast about it. But the presence of the
above-mentioned two items on MD31 indicated that the subject of
menu-design may still be open for discussion via MegaDisc, and made me
think that readers might tolerate at least one more contribution on
that topic. So here it is.
I'm still using HyperBook as my general work environment, and have as
yet no inclination to change. I boot into 'defaulthyperbook', in which
I have built a launch pad for everything I wish to do, and so of course
it contains a menu, a 'flexible selector'. Menus which look like those
described and demonstrated by John Knight and Chas Wyndham can be
produced in HyperBook, though my personal preference at the moment is
the use of a HyperBook 'list' - by definition, the most appropriate and
efficient tool for a menu, if not the most interesting visually.
For new readers and those who may have missed earlier articles on
HyperBook, here is a very brief and obviously incomplete description of
some of its main features:
Five types of 'object' can be placed on a HyperBook page:
1
Notes
Text in boxes, with any combinations of colour, style, and fonts. A
box can have different colour and/or shadow settings, or it can be
invisible.
2
Buttons
Similar to 'Notes' in almost every respect, but intended to offer
clickable buttons containing short text such as numbers or single
letters, or even no text at all.
3
Drawings
A built-in drawing editor can be used to produce drawings including
lines, rectangles, circles, polygons, etc., with various options such
as colour and fill.
4
Pictures
Any rectangle can be selected from an IFF screen obtained from any
other source, and placed in brush fashion on a page.
5
Lists
Similar to the scrolling portion of practically any file requester, but
the items in the list can be anything you like.
Any of these 'objects' can be placed anywhere on a page, stretched to
any size, copied, hidden, deleted - the possibilities are unlimited.
But what the objects look like and where they are is only the beginning
of the story. Any of them (in the case of a list, any of its items)
can also be made active, and preset to carry out any of the following
'actions':
No action Go to page
Show picture Show/hide
Display text DOS command
ARexx command ARexx macro
They all have their role to play, but the real power of HyperBook can
be tapped by using the ARexx items in the bottom line. Being in
HyperBook, we also have access to the 137 functions of HML, the
HyperBook Macro Language which I have dealt with in some detail
elsewhere.
Any text, any button, any drawing, any picture, or any item in a list
can be set to perform virtually any action. Arranging a set of any of
them to behave like a menu is an easy route to whatever you expect
from a menu : access to utilities; writing, editing, or running
programs; using DOS commands; editing or reading text; playing music;
and so on.
The action may be one of those which can be explicitly set from the
range of options shown above. I have, for example, one entry which
reads 'Jobs' (nothing to do with the Directory Utility of that name)
which leads by means of a 'Go to page' action to a page on which I have
three lists of different types of personal reminders. If I have made a
start on the job in question, then a click on its item leads me to its
workplace, whatever it is, and I can proceed with it. (The little
reminder notes I have tucked away in this fashion seem to behave like
rabbits!)
An ARexx command example
As an example of an entry which uses an ARexx command, I have a 'New
Shell' entry. You might reasonably expect that requirement to be
covered by the 'DOS command' option, but when I need to use it, I want
it to put the current HyperBook screen to the back before opening the
new Shell. So I use an ARexx command containing two clauses:
call HyperBookToBack() ; ..
.. address command 'NewShell CON:10/20/500/180/Shell/CLOSE'
When I need a Shell window, I click on the menu item, the HB screen
goes to the back, and a Shell window of the given dimensions appears.
I must admit I don't use this item in my menu very frequently, because
as soon as I find I need to use it for the same purpose more than once
or twice, I add an appropriate new item to my menu.
As entered, ARexx commands can contain several clauses, which means
that they can hold what are in fact short macros, as long as the total
length does not exceed 255 characters. Very handy.
An ARexx macro example
For bigger jobs, an ARexx macro proper is required. One which I use
every day is called 'QED_or_FV', which gets me into the QED text editor
OR into FullView, depending on which item I click on in the list.
It carries out the following steps:
° Check that 'rexxsupport.library' is active.
° Read text in clicked item, to determine whether QED or
FullView is required.
° For either, if it has not yet been copied into Ram:, copy it.
° Call FileRequest() to get the name of the file required.
° Call HyperbookToBack()
° For QED, set stack to 10000
com = 'RUN >NIL: QED ' ||filename
° For Fullview, com = 'FullView ' ||filename
° address command com
When I am working regularly on a particular text, then I activate a
variation on the 'QED_or_FV' macro which automatically loads a file of
a given name.
Any other HyperBook file can be loaded using the ARexx command 'call
LoadHyperBook(filename)', and as long as the last item of that HB
file is 'call LoadHyperBook("defaulthyperbook")', then it returns to
the menu. For example, I have recently been exploring 'Scan&Save', and
storing some of its products in a separate HB file. When I want to
see them, add to them, or whatever, then a click on my menu loads that
file, and the default file containing my menu is reloaded when I
have finished.
If a completely separate program is run, then it is not always possible
to persuade it to put the menu screen back to the front when it has
finished. In such cases, a keyclick on the back/front gadget is all
that it takes to get back - though I think that an exploration of
running brief DOS scripts may solve this.
As I said above, my menu is in a list form, and looks like the
scrollable portion of a file requester. It can be made any size, any
colour, with borders, shadows, etc. of my choice. Different colours
can be invoked if required for different types of item in the list.
Or I could quite easily go in a completely different direction,
without in any way diminishing the ease with which 'actions' can be
invoked. Each menu item could be a 'Note', designed to look like a
drawer (or anything else), with any kind of embossing, recessing,
shadowing, etc. that looks effective. Or they could be buttons, like
the dramatic little red lights in the 'MenuMaster' sample in MD31 - and
a nice touch would be to have the 'light' of a button change colour
when you click it. (A way to do this in HyperBook would be to have two
buttons in the same place, and make one of their jobs to switch
themselves off and their partner on, using the HML SetVisibility
function.)
P-Index in MD31 showed how icons can be clicked on to invoke menu
selections. The same effect is possible in HB, using sets of drawings
or pictures.
I did think of preparing a screen with samples of some of the menu
types I have been attempting to describe, but decided against it. In
the end, I thought it best to let you use your imagination. Think
about the sort of menu you would really like to have available as your
day-to-day 'flexible selector'. The chances are, it could be done in
HyperBook.
Hamilton, NZ; December, 1992
]] 32 [[ ]] 32 [[ ]] 32 [[ ]] 32 [[ ]] 32 [[ ]] 32 [[ ]] 32 [[ ]] 32 [[